package it.ipermemory.graphic;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ImageButton;

/**
 * Extend the ImageButton class to add the object that represents the graphic
 * box.
 * 
 * @author Gianluca Carlesso (gianluca.carlesso@gmail.com)
 * @version 1.0
 */
public class ImageButtonBox extends ImageButton {
	private GraphicBox gbox;

	/**
	 * Constructor that initializes the object
	 * 
	 * @param context
	 *            of application
	 */
	public ImageButtonBox(Context context) {
		super(context);
	}

	/**
	 * Constructor that initializes the object
	 * 
	 * @param context
	 *            of application
	 * @param attrs
	 *            some attributes of image button
	 */
	public ImageButtonBox(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	/**
	 * Constructor that initializes the object
	 * 
	 * @param context
	 *            of application
	 * @param attrs
	 *            some attributes of image button
	 * @param defStyle
	 *            style of pop-up
	 */
	public ImageButtonBox(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	/**
	 * Set the graphic box
	 * 
	 * @param gbox
	 *            graphic box for this ImageButton
	 */
	public void setGraphicBox(GraphicBox gbox) {
		this.gbox = gbox;
	}

	/**
	 * Return the graphic box
	 * 
	 * @return object that represent the graphic box
	 */
	public GraphicBox getGraphicBox() {
		return gbox;
	}
}
